package me.yricky.mayu.ui.tasks.taskui

import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import androidx.compose.ui.Modifier
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow

/**
 * @author Yricky
 * @date 2022/4/18
 */
interface Task {
    val name:String
    val status: TaskStatus
}

sealed interface TaskStatus{
    @Composable
    fun Page(modifier: Modifier)
}
interface Idle: TaskStatus
interface Running: TaskStatus {
    val progress: State<Float>
}
interface Finished: TaskStatus
interface Terminate: TaskStatus